优化启动器崩溃处理机制 - #6825
Conversation
CiiLu
commented
Sep 6, 2026
- 移除目前的崩溃分析机制。目前大部分规则已经过期,且正确率极低。且目前如果分析出了原因只会显示仅有原因的 Alert。在崩溃群或用户群遇到这种还得引导用户使用命令行启动 hmcl 或手动寻找日志文件,交流成本极高。
- 在崩溃窗口添加导出启动器日志按钮
- 多次出现错误时在现有窗口追加内容,避免部分频繁处理的逻辑(如加载游戏版本)出错一次性出现一大堆崩溃窗口。
| /** | ||
| * @author huangyuhui | ||
| */ | ||
| public class CrashWindow extends Stage { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.design.FinalClassCheck]
Class CrashWindow should be declared as final.
| } | ||
|
|
||
|
|
||
| public void addCrashReport(CrashReport report) { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck]
'METHOD_DEF' has more than 1 empty lines before.
|
|
||
|
|
||
|
|
||
| public static Path exportLogsAsZip() throws IOException { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck]
'METHOD_DEF' has more than 1 empty lines before.
| } | ||
|
|
||
|
|
||
| private static String getEntryName(Set<String> entryNames, String name) { |
There was a problem hiding this comment.
[ERROR] [com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck]
'METHOD_DEF' has more than 1 empty lines before.
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6a36d69dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| btnExport.setOnAction(event -> { | ||
| exportPane.getChildren().setAll(progressIndicator); | ||
| try { | ||
| Path path = LauncherLogExporter.exportLogsAsZip(); |
There was a problem hiding this comment.
Run the log export off the JavaFX application thread
When retained logs are large, compressed, or stored on a slow filesystem, this call scans, decompresses, and recompresses up to five files and waits for Logger.exportLogs directly inside the button's JavaFX action handler. The FX pulse therefore cannot render the progress indicator, the crash window remains unresponsive, and subsequent queued crash reports cannot appear until the export finishes. Dispatch the export to Schedulers.io() and return to the JavaFX executor for the dialog and button update, as the settings-page export already does.
Useful? React with 👍 / 👎.